package com.ly.heart.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.KingBomDetailMapper;
import com.ly.heart.service.IKingBomDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingBomDetailEntity;

import javax.annotation.Resource;

/**
 * BOM清单子项明细Service业务层处理
 * @author wutao
 * @date 2024-07-26
 */
@Service
public class KingBomDetailServiceImpl extends ServiceImpl<KingBomDetailMapper, KingBomDetailEntity> implements IKingBomDetailService {

    @Resource
    private KingBomDetailMapper kingBomDetailEntityMapper;

    /**
     * 查询BOM清单子项明细
     * @param id BOM清单子项明细ID
     * @return BOM清单子项明细
     */
    @Override
    public KingBomDetailEntity selectKingBomDetailEntityById (String id) {
        return kingBomDetailEntityMapper.selectKingBomDetailEntityById ( id );
    }

    /**
     * 查询BOM清单子项明细列表
     * @param kingBomDetailEntity BOM清单子项明细
     * @return BOM清单子项明细
     */
    @Override
    public List<KingBomDetailEntity> selectKingBomDetailEntityList (KingBomDetailEntity kingBomDetailEntity) {
        return kingBomDetailEntityMapper.selectKingBomDetailEntityList ( kingBomDetailEntity );
    }

    /**
     * 新增BOM清单子项明细
     * @param kingBomDetailEntity BOM清单子项明细
     * @return 结果
     */
    @Override
    public int insertKingBomDetailEntity (KingBomDetailEntity kingBomDetailEntity) {
        kingBomDetailEntity.setCreateTime ( DateUtils.getNowDate () );
        return kingBomDetailEntityMapper.insertKingBomDetailEntity ( kingBomDetailEntity );
    }

    /**
     * 修改BOM清单子项明细
     * @param kingBomDetailEntity BOM清单子项明细
     * @return 结果
     */
    @Override
    public int updateKingBomDetailEntity (KingBomDetailEntity kingBomDetailEntity) {
        kingBomDetailEntity.setUpdateTime ( DateUtils.getNowDate () );
        return kingBomDetailEntityMapper.updateKingBomDetailEntity ( kingBomDetailEntity );
    }

    /**
     * 批量删除BOM清单子项明细
     * @param ids 需要删除的BOM清单子项明细ID
     * @return 结果
     */
    @Override
    public int deleteKingBomDetailEntityByIds (String[] ids) {
        return kingBomDetailEntityMapper.deleteKingBomDetailEntityByIds ( ids );
    }

    /**
     * 删除BOM清单子项明细信息
     * @param id BOM清单子项明细ID
     * @return 结果
     */
    @Override
    public int deleteKingBomDetailEntityById (String id) {
        return kingBomDetailEntityMapper.deleteKingBomDetailEntityById ( id );
    }
}
